<?php

namespace App\Admin;

use Illuminate\Database\Eloquent\Model;

class Member extends Model
{
    //定义数据表
    protected $table = 'member';
    //建立两表关系
    public function area() {

    	return $this ->  hasOne('App\Admin\Area','id','province_id');    
    }
    public function city() {

    	return $this ->  hasOne('App\Admin\Area','id','city_id');    
    }
    public function county() {

    	return $this ->  hasOne('App\Admin\Area','id','county_id');    
    }

}

